<?php
/**
 * Widget for displaying content on home page
 *
 * Used for both single and index/archive/search.
 *
 * @package WordPress
 * @subpackage lebanontimes
 * @since Lebanon Times 1.0
 */

include dirname(__FILE__)."/categoryMapping.php";


$weatherForecast = loadWeatherForecast();

?>
<div class="widget weatherWidget">
    <div class="tabActive">
        <a href="<?php echo esc_url( home_url( '/' ) ); ?>الحالة-الجوية/">الحالة الجوية</a>
    </div>
    <div class="content" style="height: auto;">
        <ul>
            <li style="height: 85px; padding: 6px 0px 0px;">
                <img src="<?php echo $weatherForecast['day1']['imageurl'];?>">
                <div>
                    <span><?php echo $weatherForecast['day1']['day'];?>، <?php echo $weatherForecast['day1']['date'];?></span><br/>
                    <?php echo $weatherForecast['day1']['text'];?><br/>
                    <div class="high"><?php echo $weatherForecast['day1']['high'];?>&deg; C</div><div class="low"><?php echo $weatherForecast['day1']['low'];?>&deg; C</div><br/>
                </div>
            </li>
            <li style="height: 85px; padding: 20px 0px 0px; border-top: 1px solid #999999; border-bottom: 1px solid #999999;">
                <p>
                    <img src="<?php echo $weatherForecast['day2']['imageurl'];?>">
                    <div>
                        <span><?php echo $weatherForecast['day2']['day'];?>، <?php echo $weatherForecast['day2']['date'];?></span><br/>
                        <?php echo $weatherForecast['day2']['text'];?><br/>
                        <div class="high"><?php echo $weatherForecast['day2']['high'];?>&deg; C</div><div class="low"><?php echo $weatherForecast['day2']['low'];?>&deg; C</div><br/>
                    </div>
                </p>
            </li>
            <li style="height: 85px; padding: 20px 0px 0px;">
                <p>
                    <img src="<?php echo $weatherForecast['day3']['imageurl'];?>">
                    <div>
                        <span><?php echo $weatherForecast['day3']['day'];?>، <?php echo $weatherForecast['day3']['date'];?></span><br/>
                        <?php echo $weatherForecast['day3']['text'];?><br/>
                        <div class="high"><?php echo $weatherForecast['day3']['high'];?>&deg; C</div><div class="low"><?php echo $weatherForecast['day3']['low'];?>&deg; C</div><br/>
                    </div>
                </p>
            </li>
        </ul>
    </div>
</div>